package top.oylan.manager.service;

import top.oylan.manager.entity.Action;
import top.oylan.manager.entity.extend.ActionExtend;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author abduahad
 * @Description ${description}
 * @Date 2019-02-11
 */
public interface ActionService {

    List<Action> selectActionByParentId(Integer parentId);

    List<ActionExtend> selectAllActions();

    Action selectActionById(Integer id);

    void update(Action action) throws SQLException;

    void add(Action action) throws SQLException;

    void delete(Integer id) throws Exception;

    List<Action> selectActionsByParentIdAndUserId(Integer parentId,Integer userId);

    List<ActionExtend> selectAllActionsWithAuth(Integer roleId);


    int  deletePermsByRoleId(Integer roleId);

    int  savePerm(Integer roleId,List<Integer> actions);
}
